<style>
	.pageFormContent dl.nowrap, .nowrap dl{width:100%;}
	.pageFormContent dl.nowrap dd, .nowrap dd,.pageFormContent dt{width:auto;}
	.pageFormContent dt{ font-weight:bolder;}
</style>
<div class="pageContent">
    <div class="pageFormContent" layouth="56" style="height: 290px; overflow: auto;">
        
        <fieldset>
            <legend>订单信息</legend>
            <div>
                <table class="table" width="98%" align="center" class="table_imeiabc1">
                    <thead>
                    <tr align="center">
                        <th width="15%">商品编号</th>
                        <th>商品名称</th>
                        <th width="10%">单价</th>
                        <th width="10%">采购数量</th>
                        <th width="12%">CV</th>
                    </tr>
                    </thead>
                    <tbody>
                    <if condition="empty($order['goods'])">
                    <tr align="center">
                        <td colspan="5" style="padding:10px;border:0;color:#FB0000;" align="center">没有产品!</td>
                    </tr>
                    <else/>
                    <volist name="order['goods']" id="vo">
                    <tr align="center">
                        <td height="30" style="border-left:none;"><a target="dialog" width="880" height="650" href="{:U('Content/show',array('id'=>$vo['product_id']))}">{$vo['product_psn']}</a></td>
                        <td>{$vo['product_name']}</td>
                        <td>{$vo['price']/100|number_format=###,2}</td>
                        <td>{$vo['number']}</td>
                        <td><span class="count_price" id="count_price_{$vo['product_id']}">{$vo['priceall']/100|number_format=###,2}</span></td>
                    </tr>
					<php>for($i=0;$i<$vo['number'];$i++){</php>
                    <tr align="center">
                        <td colspan="5">手机串码：<input name="imei{$vo['product_id']}[]"/></td>
                    </tr>
					<php>}</php>
					<input type="hidden" name="product_id[]" value="{$vo['product_id']}"/>
                    </volist>
                    </if>
                    <tr align="center"><input type="hidden" name="user_id" value="{$order['userid']};"/><input type="hidden" name="order_id" value="{$order['id']};"/>
                        <td colspan="5"><input value="保存" type="button" class="imeiabc1" onclick="afdsff(this)"/></td>
                    </tr>
                    <tbody>
                    </table>
            </div>
        </fieldset>
                
            </div>
        </div>
<script>
function afdsff(obj){
	var obj = $(obj);
	var afd = obj.parents("table").find("input").serialize();
	$.ajax({
		type:'POST',
		url:"{:U('Order/imei_do')}",
		data:afd,
		dataType:"json",
		cache: false,
		success:function(json){
			if (json) {alert('保存成功');$.pdialog.closeCurrent();}
			
		},
	});
}
</script>
